package cn.adkii.mybatis.session.defaults;


import cn.adkii.mybatis.binding.MapperRegistry;
import cn.adkii.mybatis.session.Configuration;
import cn.adkii.mybatis.session.SqlSession;
import cn.adkii.mybatis.session.SqlSessionFactory;

/**
 * @author malingdi
 * @description SqlSession 工厂的实现
 * @date 2023/12/1 18:52
 */
public class DefaultSqlSessionFactory  implements SqlSessionFactory {
    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
